import React from "react";
import { useSelector } from "react-redux";
import './style.css'
import { Cell } from 'react-vant'
import { useNavigate } from "react-router-dom";
const Index = () => {
  const userInfo = useSelector(state => state.userReducer.userInfo);
  const navigate = useNavigate()
  return <div>
    <div className="top">
      <img src={userInfo.avator} alt="" />
      <h2>{userInfo.nickname}</h2>
    </div>

    <Cell.Group>
      <Cell title='个人信息'  isLink/>
      <Cell title='我的钱包'  isLink/>
      <Cell title='我的收藏' onClick={() => navigate('/collect')} isLink/>
      <Cell title='设置'  isLink/>
    </Cell.Group>
  </div>;
};

export default Index;
